<template>
	<view>
		<u-navbar back-text="返回" backIconColor="#fff" :backTextStyle="backTextColor" :background="background">
		</u-navbar>
		<view>
			<u-image :src="image" @click="click" :height="height" borderRadius="12" :preview="preview" preview-full-screen="true"></u-image>
			<bottomRight :padding="padding" :list="rightList"></bottomRight>
		</view>
	</view>
</template>

<script>
	import bottomRight from '@/components/bottomRight.vue';
	export default {
		components: {
			bottomRight
		},
		data() {
			return {
				background: this.TopColor,
				backTextColor: {
					'color': '#ffffff'
				},
				padding:'0rpx',
				image: '',
				height: 0,
				rightList: [{
					icon: 'heart',
					name:'收藏'
				},{
					icon:'red-packet',
					name:'打赏'
				},{
					icon:'share',
					name:'分享'
				}],
				preview:true,
			}
		},
		onLoad(e) {
			let system = uni.getSystemInfoSync();
			let height = (system.windowHeight - system.statusBarHeight - 44);
			let rpx = height / (uni.upx2px(100) / 100);
			this.height = parseInt(rpx);
			if (e.img) {
				this.image = e.img;
			}
		},
		methods: {
			click() {
				this.$common.previewImage(0, [this.image]);
			},
			rmbClick() {
				this.showRmb = !this.showRmb
			}
		}
	}
</script>

<style lang="scss">
</style>
